/*    */ package com.wgcloud.service;
/*    */ 
/*    */ import com.github.pagehelper.PageHelper;
/*    */ import com.github.pagehelper.PageInfo;
/*    */ import com.wgcloud.entity.HostGroup;
/*    */ import com.wgcloud.mapper.HostGroupMapper;
/*    */ import com.wgcloud.util.DateUtil;
/*    */ import com.wgcloud.util.UUIDUtil;
/*    */ import java.util.List;
/*    */ import java.util.Map;
/*    */ import org.springframework.beans.factory.annotation.Autowired;
/*    */ import org.springframework.stereotype.Service;
/*    */ import org.springframework.transaction.annotation.Transactional;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ @Service
/*    */ public class HostGroupService
/*    */ {
/*    */   @Autowired
/*    */   private HostGroupMapper HostGroupMapper;
/*    */   
/*    */   public PageInfo selectByParams(Map<String, Object> params, int currPage, int pageSize) throws Exception {
/* 28 */     PageHelper.startPage(currPage, pageSize);
/* 29 */     List<HostGroup> list = this.HostGroupMapper.selectByParams(params);
/* 30 */     PageInfo<HostGroup> pageInfo = new PageInfo(list);
/* 31 */     return pageInfo;
/*    */   }
/*    */   
/*    */   public void save(HostGroup hostGroup) throws Exception {
/* 35 */     hostGroup.setId(UUIDUtil.getUUID());
/* 36 */     hostGroup.setCreateTime(DateUtil.getNowTime());
/* 37 */     this.HostGroupMapper.save(hostGroup);
/*    */   }
/*    */   
/*    */   @Transactional
/*    */   public int deleteById(String[] id) throws Exception {
/* 42 */     return this.HostGroupMapper.deleteById(id);
/*    */   }
/*    */ 
/*    */ 
/*    */   
/*    */   public void updateById(HostGroup hostGroup) throws Exception {
/* 48 */     this.HostGroupMapper.updateById(hostGroup);
/*    */   }
/*    */   
/*    */   public HostGroup selectById(String id) throws Exception {
/* 52 */     return this.HostGroupMapper.selectById(id);
/*    */   }
/*    */   
/*    */   public List<HostGroup> selectAllByParams(Map<String, Object> params) throws Exception {
/* 56 */     return this.HostGroupMapper.selectAllByParams(params);
/*    */   }
/*    */ }


/* Location:              /Users/zhangyongxin/soft-install/wgcloud/wgcloud-v3.3.5/server/bank/wgcloud-server-release.jar!/BOOT-INF/classes/com/wgcloud/service/HostGroupService.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */